
       SUBROUTINE ptkf_inqcurelemtype(error, eltype)
C /*
C ** \parambegin
C ** \param{INTEGER}{error}{error indicator}{OUT}
C ** \param{INTEGER}{eltype}{element type}{OUT}
C ** \paramend 
C ** \blurb{This function may be used to obtain the current element type
C ** and works for both SunPHIGS and DEC PHIGS.}
C */
       INTEGER error, eltype
       external ptk_inqcurelemtype !$PRAGMA C(ptk_inqcurelemtype)

       call ptk_inqcurelemtype(error, eltype)

       RETURN
       END

       SUBROUTINE ptkf_inqelemtype(stid, elemid, error, eltype)
C /*
C ** \parambegin
C ** \param{INTEGER}{stid}{structure identifier}{IN}
C ** \param{INTEGER}{elemid}{element number}{IN}
C ** \param{INTEGER}{error}{error indicator}{OUT}
C ** \param{INTEGER}{eltype}{element type}{OUT}
C ** \paramend 
C ** \blurb{This function may be used to obtain the element type of
C ** element {\tt elemid} in structure {\tt stid}
C ** and works for both SunPHIGS and DEC PHIGS.}
C */
       INTEGER stid, elemid, error, eltype
       external ptk_inqelemtype !$PRAGMA C(ptk_inqelemtype)

       call ptk_inqelemtype(%val(stid), %val(elemid), error, eltype)

       RETURN
       END

       INTEGER FUNCTION ptkf_fopen(filename, type)
C /*
C ** \parambegin
C ** \param{CHARACTER*(*)}{filename}{name of file to open}{IN}
C ** \param{CHARACTER*(*)}{type}{type string for reading or writing}{IN}
C ** \paramend 
C ** \blurb{This function may be used to open a file and
C ** obtain the file pointer to the open file.
C ** The pointer is returned as the result of the function.}
C */
       CHARACTER*(*) filename, type
       INTEGER*4 ptkc_fopen
       external ptkc_fopen !$PRAGMA C(ptkc_fopen)

       ptkf_fopen = ptkc_fopen(filename, type)

       RETURN
       END

       INTEGER FUNCTION ptkf_fclose(fileptr)
C /*
C ** \parambegin
C ** \param{INTEGER}{fileptr}{file pointer}{IN}
C ** \paramend 
C ** \blurb{This function may be used to close a file using
C ** the file pointer obtained from {\tt ptkf\_fopen}.}
C */
       INTEGER fileptr
       INTEGER ptkc_fclose
       external ptkc_fclose !$PRAGMA C(ptkc_fclose)

       ptkf_fclose = ptkc_fclose(%val(fileptr))

       RETURN
       END

C end of misc.f
